import java.util.Arrays;
import java.util.Scanner;

public class practice {
    public static void printArray(int[] arr){
        for(int i = 1;i <= arr.length; i++){
            arr[i-1] = i;
        }
        String ret = Arrays.toString(arr);
        System.out.print(ret);
    }
    public  static void main(String[] args) {
        int[] array =new int[100];
        printArray(array);
    }
    public static void main6(String[] args) {
        int[] array =new int[100];
        for(int i = 1;i <= array.length; i++){
            array[i-1] = i;
        }
        String ret = Arrays.toString(array);
        System.out.print(ret);
    }
    public static void Hannuota(int n,char pos,char pos1,char pos2){
        if(n == 1){
            move(pos,pos2);
            return;
        }else{
            Hannuota(n-1,pos,pos2,pos1);
            move(pos,pos2);
            Hannuota(n-1,pos1,pos,pos2);
        }
    }
    public static void move(char pos,char pos1){
        System.out.print(pos+"->"+pos1+" ");
    }
    public static void main5(String[] args) {
        //汉诺塔
        System.out.println("请输入盘子的数量");
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        Hannuota(n,'A','B','C');
    }
    public static int Fibonacci(int n){
        if(n <= 2){
            return 1;
        }else{
            return Fibonacci(n-1)+Fibonacci(n-2);
        }
    }
    public static void main4(String[] args) {
        System.out.println("请输入一个数字");
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int ret = Fibonacci(n);
        System.out.println("第"+n+"个斐波那契数为"+ret);
    }
    public static int Sum(int n){
        if(n <= 9){
            return n;
        }else{
            return n%10+(n/10);

        }

    }

    public static void main3(String[] args) {
        //写一个递归方法，输入一个非负整数，返回组成它的数字之和
        System.out.println("请输入一个数字");
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int ret = Sum(n);
        System.out.println(ret);
    }
    public static void reverse(int n){
        if(n <= 9){
            System.out.print(n+" ");
        }else{
            reverse(n/10);
            System.out.print(n%10+" ");
        }

    }
    public static void main2(String[] args) {
        System.out.println("请输入一个数字");
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        reverse(n);
    }
    public static int fun(int n){
        if(n == 1){
            return 1;
        }
        else {
            return n+fun(n-1);
        }
    }
    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int ret = fun(n);
        System.out.println("从0开始累加到"+n+"的和是"+ret);
    }
}
